package com.ws.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ws.entity.Team;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface TeamMapper extends BaseMapper<Team> {

    @Select("select     " +
            "id,    " +
            "`name`,     " +
            "size,    " +
            "goods_id,    " +
            "insert_time,    " +
            "end_time,    " +
            "`status`,    " +
            "is_on_sale,    " +
            "team_discount,    " +
            "remark,    " +
            "has_member,    " +
            "type    " +
            "from shop_team    " +
            "where " +
            "type = ${type}")
    Page<Team> getTeamListForPage(
            @Param("type") Integer type,
            @Param("isOnSale") Integer isOnSale,
            Page<Team> page);
}
